package com.info.zhiduoduo.repository.entity.invoice;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;


@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("zdd_invoice_company_inventory_record")
public class CompanyInventoryRecord extends Model<CompanyInventoryRecord> {


    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 主体企业
     */
    @TableField("company_id")
    private Integer companyId;

    /**
     * 发票类型: 1:普票 2:专票
     */
    @TableField("invoice_type")
    private Integer invoiceType;
    /**
     * 版本: 1:一万元版 2:十万元版
     */
    @TableField("amount_type")
    private Integer amountType;

    /**
     * 发票数量
     */
    @TableField("invoice_num")
    private Integer invoiceNum;

    /**
     * 状态: 1:待入库 2:已入库 3:已出库
     */
    private Integer state;

    /**
     * 发票id (只有 出库才会记录)
     */
    @TableField("invoice_id")
    private Integer invoiceId;
    /**
     *发票剩余数量
     *
     */
    @TableField("invoice_sum")
    private Integer invoiceSum;

    /**
     * 操作人员id
     */
    private Integer adminid;

    /**
     * 入库时间
     */
    @TableField("entry_time")
    private Date entryTime;

    /**
     * 逻辑删除 0：正常 1：已删除
     */
    @TableLogic
    private Integer deleted;


    private Date createtime;
    private Date updatetime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
